package com.entfrm.biz.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.entfrm.biz.system.entity.TProduct;
import com.entfrm.biz.system.mapper.TProductMapper;
import com.entfrm.biz.system.service.ProductService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class ProductServiceImpl  extends ServiceImpl<TProductMapper, TProduct> implements ProductService {
    /**
     * 根据ID更改上下架
     * @param id 商品编号
     * @param ground 上下架状态
     */
    public void updateGround(String id,String ground){
        baseMapper.updateGround(id,ground);
    }
    /**
     * 根据ID更改上下架
     * @param ownerId 购买人ID
     * @param productId 商品ID
     *  @param ownerName 购买人姓名
     */
    public void changeOwn(String ownerId,String productId,String ownerName){
        baseMapper.updateOwn(ownerId,productId,ownerName);
    }
}
